package runNian;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int year= sc.nextInt();
        System.out.println(check(year));
    }
    public static boolean check(int year){
        if(year%4==0&&year%100!=0){
            return true;
        }
        else if(year%400==0){
            return true;
        }
        return false;
    }
}
